#include <memory>
#include <iostream>
using namespace std;
int main()
{
	std::shared_ptr<int> p(new int);
	weak_ptr<int> ps(p);
	p.reset();
	if(ps.lock().use_count() == 0)
	{
		cerr<<"can not lock"<<endl;
	}
}
